/**************************************************************************
 * Name         : PVRJPEG.h
 * Title        : PowerVR API Return Codes
 * Author       : Jason Rogers
 * Created      : 23/02/05
 *
 * Copyright   : 2005 by Imagination Technologies. All rights reserved.
 *             : No part of this software, either material or conceptual 
 *             : may be copied or distributed, transmitted, transcribed,
 *             : stored in a retrieval system or translated into any 
 *             : human or computer language in any form by any means,
 *             : electronic, mechanical, manual or other-wise, or 
 *             : disclosed to third parties without the express written
 *             : permission of Imagination Technologies Limited, Unit 8,
 *             : HomePark Industrial Estate, King's Langley, Hertfordshire,
 *             : WD4 8LZ, U.K.
 *
 * Description  :
 *
 * Platform     : 
 *

 Version	 	: $ $ 

 Modifications	:
 $Log: PVRReturnCode.h,v $

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

  --- Revision Logs Removed --- 

 */


#ifndef _PVR_RETURN_CODE_H
#define _PVR_RETURN_CODE_H

#include "img_types.h"



typedef enum {

	PVRRC_OK				= 0,


	PVRRC_GENERIC_ERROR		= 1,
	PVRRC_INVALID_PARAMETER,
	PVRRC_INCORRECT_SURFACE_FORMAT,
	PVRRC_OUT_OF_MEMORY,
	PVRRC_HARDWARE_NOT_AVAILABLE,
	PVRRC_NOT_INITIALISED,
	PVRRC_TIMED_OUT,
	PVRRC_BUSY,
	PVRRC_SURFACE_LOCKED,
	PVRRC_SURFACE_NOTLOCKED,

	PVRRC_NO_SUCH_API,

	PVRRC_BAD_INSTANCE,

	/* JPEG DECODE ERROR CODES */
	PVRRC_JPEGDEC_BITSTREAM_ERROR,
	PVRRC_JPEGDEC_SOI_NOT_FOUND,
	PVRRC_JPEGDEC_NUM_VLD_EXCEEDS_64,
	PVRRC_JPEGDEC_RESTART_MARKER_NOT_FOUND,
	PVRRC_JPEGDEC_INVALID_RUN,
	PVRRC_JPEGDEC_UNSUPORTED,  

	PVRRC_JPEG_CANNOT_BEGIN,
	PVRRC_JPEG_NO_BEGIN,
	PVRRC_JPEG_DECODE_ERROR,
	PVRRC_JPEG_ENCODE_ERROR,
	PVRRC_BUFFER_TOO_SMALL,


	PVRRC_ABORT,
	PVRRC_POWER_ABORT,

	PVRRC_INIT_FAILURE,
	PVRRC_FILE_NOT_FOUND,

	/* VEA ERROR CODES */
	PVRRC_VEA_UNSUPORTED_VIDEO_STANDARD,
	PVRRC_VEA_DATA_NOT_READY,
	PVRRC_VEA_THREAD_CREATION_FAILED,
	PVRRC_STREAM_FLUSH_ERROR,

	/*Other ERROR CODES*/
	PVRRC_MEMORY_NOT_PHYCONTIGUOUS

} PVRRC;


/* Lots more go here */

#define PVR_SUCCESS(_ReturnCode_)	( ( _ReturnCode_ )==PVRRC_OK )
#define PVR_FAIL(_ReturnCode_)	( ( _ReturnCode_ )!=PVRRC_OK )

#endif
